/*
 *  mini-SaaS
 *  Application for developing Software as a Service (SaaS) 
 *  Copyright (c) 2011 Anand Sudhakaran, Bryce Holton, Chao Zhang
 *  ASU
 *
 *  This file is part of mini-SaaS.
 *
 *  mini-SaaS is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *  
 *  mini-SaaS is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.

 *  You should have received a copy of the GNU General Public License
 *  along with mini-SaaS; if not, see <http://www.gnu.org/licenses/>. 
 *
 */package loginbean;

public class VerifyCreditCardServiceProxy implements loginbean.VerifyCreditCardService {
  private String _endpoint = null;
  private loginbean.VerifyCreditCardService verifyCreditCardService = null;
  
  public VerifyCreditCardServiceProxy() {
    _initVerifyCreditCardServiceProxy();
  }
  
  public VerifyCreditCardServiceProxy(String endpoint) {
    _endpoint = endpoint;
    _initVerifyCreditCardServiceProxy();
  }
  
  private void _initVerifyCreditCardServiceProxy() {
    try {
      verifyCreditCardService = (new loginbean.VerifyCreditCardServiceServiceLocator()).getVerifyCreditCardService();
      if (verifyCreditCardService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)verifyCreditCardService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)verifyCreditCardService)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (verifyCreditCardService != null)
      ((javax.xml.rpc.Stub)verifyCreditCardService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public loginbean.VerifyCreditCardService getVerifyCreditCardService() {
    if (verifyCreditCardService == null)
      _initVerifyCreditCardServiceProxy();
    return verifyCreditCardService;
  }
  
  public java.lang.String verifyCreditCard(int tenantid, java.lang.String CCNum) throws java.rmi.RemoteException{
    if (verifyCreditCardService == null)
      _initVerifyCreditCardServiceProxy();
    return verifyCreditCardService.verifyCreditCard(tenantid, CCNum);
  }
  
  
}